<?php get_header(); ?>

	<section class="vote">
        <div class="vote_center">
            <div class="aside_left">
            	<div class="column_name">
            		<?php echo get_the_category()[0]->name; ?>
            	</div>
            		<div class="article_main">
            			<?php if (have_posts()) :$ashu_i=0;?>   
					<?php while (have_posts()) : the_post();$ashu_i++;?>  
            			<p class="article_title"><?php the_title(); ?></p>
            			<p class="article_msg">
            				作者：<?php the_author();  ?>&nbsp;&nbsp;发布时间：<?php the_time("Y-m-d G:m:s"); ?>
            			</p>
						<hr style="height: 1px;background-color:#bbb;margin: 10px 0px;border:none;">
	
					<div class="article_content">
					<?php the_content();?>   
					</div>
					<?php   ?> 
					<?php endwhile; ?>   
					<?php else : ?>   
					此处显示未找到文章时的信息，比如404相关   
					<?php endif; ?> 
				</div> 
			</div>
            <div class="aside_right">
                <div class="follow_slide">
                	<div class="share">
                		<div>
                			<img onclick="dialog()" src="<?php bloginfo('template_directory'); ?>/img/wx.jpg" alt=""></a>
                			<span>微信</span>
                		</div>
                		<div>
                			<a href="javascript:void(0);" onclick="window.open('http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?title='+encodeURIComponent(<?php the_title(); ?>)+'---'+encodeURIComponent('文章标题')+'&url='+encodeURIComponent(document.location.href));return false;" title="分享到QQ空间"><img src="<?php bloginfo('template_directory'); ?>/img/qq.jpg" alt=""></a>
                			<span>QQ空间</span>
                		</div>
                		<div>
                			<a href="javascript:(function(){window.open('http://v.t.sina.com.cn/share/share.php?title='+encodeURIComponent(<?php the_title(); ?>)+'---'+encodeURIComponent('文章标题')+'&url='+encodeURIComponent(location.href)+'&source=bookmark','_blank');})()" class="jiathis_button_tsina share-btn" title="分享到新浪微博"><img src="<?php bloginfo('template_directory'); ?>/img/wb.jpg" alt=""></a>
                			<span>微博</span>
                		</div>
                	</div>
                	<div class="qrcode" style="display:none;position: fixed;z-index: 999">
                <div class="qrcode_title"><span>×</span>扫描二维码</div>
                <div class="hidqrcode"></div>
            </div>
                	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.qrcode.js"></script>
            <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/qrcode.js"></script>
            <script>
                function dialog(){
                    var img = $(".hidqrcode").html();
                    //alert(window.location.href);
                    var winH = document.documentElement.clientHeight ;
                    var winW = document.documentElement.clientWidth ;
                    $(".qrcode").show().css({'top':(winH-300)/2, 'left':(winW-300)/2});
                }
                $(function(){
                    // 微信二维码分享
                    url = window.location.href;
                    $(".hidqrcode").qrcode({
                        render  : "table",
                        text    : url
                    });
                    $(".qrcode_title").find("span").click(function(){
                        $(".qrcode").hide();
                    });
                });
                let start=$(".column_name").eq(0).parent().parent().offset().top;
                window.onscroll=function(){
		            let this_status;
		            let top=$(window)[0].scrollY;
		            if(top>start){
		                $(".follow_slide").css({top:top-start+"px"})
		            }
		        }
            </script>

                </div>
            </div>
        </div>
    </section>
	
<?php get_footer(); ?>